#include "Test.h"
#include <time.h>


template<typename _T> void PrintFieldInfo()
{
	printf("%s size: %d\n", typeid(_T).name(), sizeof(_T));
	printf("FieldInfo size: %d\n", _T::fieldInfo.size());
	for (auto iter = _T::fieldInfo.begin(); iter != _T::fieldInfo.end(); iter++)
	{
		printf("%d\t%s\t%s\n", (*iter).offset, (*iter).name.c_str(), GetDataTypeName((*iter).type).c_str());
	}
}


void main()
{
 	PrintFieldInfo<TestA>();
	
	printf("\n");

	PrintFieldInfo<TestB>();

	printf("\n");

	TestA testA;
	ParseType<TestA>().SimpleParse(testA, "var_integer=3");

	printf("\n");

	TestB testB;
	ParseType<TestB>().SimpleParse(testB, "var_testA={var_integer=3}");

	printf("\n");
}
